﻿@using Newtouch.Infrastructure;
@{
    ViewBag.Title = "牙位图";
    Layout = "~/Views/Shared/_Form.cshtml";
}
<style>
    .teeth-container {
        /*background-image: url('../../Content/img/牙位图.png');*/
        width: 500px;
        height: 500px;
        background-size: cover;
        float: left;
    }

    .bg-ryt {
        width: 500px;
        height: 500px;
        background-size: cover;
        position: absolute;
        margin-left: 500px;
    }

    .nr-xzyw {
        position: absolute;
        margin-left: 500px;
        margin-top: 400px;
    }

    #yw1-8 {
        width: 40px;
        height: 40px;
        position: absolute;
        margin-left: 125px;
        margin-top: 190px;
        border-radius: 10px;
        text-align: center;
        line-height: 40px;
    }

    #yw2-8 {
        width: 40px;
        height: 40px;
        position: absolute;
        margin-left: 338px;
        margin-top: 190px;
        border-radius: 10px;
        text-align: center;
        line-height: 40px;
    }

    #yw3-8 {
        width: 40px;
        height: 40px;
        position: absolute;
        margin-left: 338px;
        margin-top: 265px;
        border-radius: 10px;
        text-align: center;
        line-height: 40px;
    }

    #yw4-8 {
        width: 40px;
        height: 40px;
        position: absolute;
        margin-left: 125px;
        margin-top: 265px;
        border-radius: 10px;
        text-align: center;
        line-height: 40px;
    }

    #yw1-7 {
        width: 40px;
        height: 40px;
        position: absolute;
        margin-left: 128px;
        margin-top: 150px;
        border-radius: 10px;
        text-align: center;
        line-height: 40px;
    }

    #yw2-7 {
        width: 40px;
        height: 40px;
        position: absolute;
        margin-left: 333px;
        margin-top: 150px;
        border-radius: 10px;
        text-align: center;
        line-height: 40px;
    }

    #yw3-7 {
        width: 40px;
        height: 40px;
        position: absolute;
        margin-left: 333px;
        margin-top: 305px;
        border-radius: 10px;
        text-align: center;
        line-height: 40px;
    }

    #yw4-7 {
        width: 40px;
        height: 40px;
        position: absolute;
        margin-left: 128px;
        margin-top: 305px;
        border-radius: 10px;
        text-align: center;
        line-height: 40px;
    }

    #yw1-6 {
        width: 40px;
        height: 40px;
        position: absolute;
        margin-left: 135px;
        margin-top: 115px;
        border-radius: 10px;
        text-align: center;
        line-height: 40px;
    }

    #yw2-6 {
        width: 40px;
        height: 40px;
        position: absolute;
        margin-left: 328px;
        margin-top: 115px;
        border-radius: 10px;
        text-align: center;
        line-height: 40px;
    }

    #yw3-6 {
        width: 40px;
        height: 40px;
        position: absolute;
        margin-left: 328px;
        margin-top: 345px;
        border-radius: 10px;
        text-align: center;
        line-height: 40px;
    }

    #yw4-6 {
        width: 40px;
        height: 40px;
        position: absolute;
        margin-left: 135px;
        margin-top: 345px;
        border-radius: 10px;
        text-align: center;
        line-height: 40px;
    }

    #yw1-5 {
        width: 32px;
        height: 30px;
        position: absolute;
        margin-left: 143px;
        margin-top: 90px;
        border-radius: 10px;
        text-align: center;
        line-height: 30px;
    }

    #yw2-5 {
        width: 32px;
        height: 30px;
        position: absolute;
        margin-left: 322px;
        margin-top: 90px;
        border-radius: 10px;
        text-align: center;
        line-height: 30px;
    }

    #yw3-5 {
        width: 32px;
        height: 30px;
        position: absolute;
        margin-left: 322px;
        margin-top: 380px;
        border-radius: 10px;
        text-align: center;
        line-height: 30px;
    }

    #yw4-5 {
        width: 32px;
        height: 30px;
        position: absolute;
        margin-left: 143px;
        margin-top: 380px;
        border-radius: 10px;
        text-align: center;
        line-height: 30px;
    }

    #yw1-4 {
        width: 32px;
        height: 30px;
        position: absolute;
        margin-left: 157px;
        margin-top: 65px;
        border-radius: 10px;
        text-align: center;
        line-height: 30px;
    }

    #yw2-4 {
        width: 32px;
        height: 30px;
        position: absolute;
        margin-left: 312px;
        margin-top: 65px;
        border-radius: 10px;
        text-align: center;
        line-height: 30px;
    }

    #yw3-4 {
        width: 32px;
        height: 30px;
        position: absolute;
        margin-left: 312px;
        margin-top: 405px;
        border-radius: 10px;
        text-align: center;
        line-height: 30px;
    }

    #yw4-4 {
        width: 32px;
        height: 30px;
        position: absolute;
        margin-left: 157px;
        margin-top: 405px;
        border-radius: 10px;
        text-align: center;
        line-height: 30px;
    }

    #yw1-3 {
        width: 32px;
        height: 30px;
        position: absolute;
        margin-left: 169px;
        margin-top: 37px;
        border-radius: 10px;
        text-align: center;
        line-height: 30px;
    }

    #yw2-3 {
        width: 32px;
        height: 30px;
        position: absolute;
        margin-left: 299px;
        margin-top: 37px;
        border-radius: 10px;
        text-align: center;
        line-height: 30px;
    }

    #yw3-3 {
        width: 32px;
        height: 30px;
        position: absolute;
        margin-left: 299px;
        margin-top: 433px;
        border-radius: 10px;
        text-align: center;
        line-height: 30px;
    }

    #yw4-3 {
        width: 32px;
        height: 30px;
        position: absolute;
        margin-left: 169px;
        margin-top: 433px;
        border-radius: 10px;
        text-align: center;
        line-height: 30px;
    }

    #yw1-2 {
        width: 28px;
        height: 28px;
        position: absolute;
        margin-left: 193px;
        margin-top: 18px;
        border-radius: 10px;
        text-align: center;
        line-height: 30px;
    }

    #yw2-2 {
        width: 28px;
        height: 28px;
        position: absolute;
        margin-left: 280px;
        margin-top: 18px;
        border-radius: 10px;
        text-align: center;
        line-height: 30px;
    }

    #yw3-2 {
        width: 28px;
        height: 28px;
        position: absolute;
        margin-left: 280px;
        margin-top: 454px;
        border-radius: 10px;
        text-align: center;
        line-height: 30px;
    }

    #yw4-2 {
        width: 28px;
        height: 28px;
        position: absolute;
        margin-left: 193px;
        margin-top: 454px;
        border-radius: 10px;
        text-align: center;
        line-height: 30px;
    }

    #yw1-1 {
        width: 30px;
        height: 30px;
        position: absolute;
        margin-left: 218px;
        margin-top: 6px;
        border-radius: 10px;
        text-align: center;
        line-height: 30px;
    }

    #yw2-1 {
        width: 30px;
        height: 30px;
        position: absolute;
        margin-left: 250px;
        margin-top: 6px;
        border-radius: 10px;
        text-align: center;
        line-height: 30px;
    }

    #yw3-1 {
        width: 30px;
        height: 30px;
        position: absolute;
        margin-left: 250px;
        margin-top: 463px;
        border-radius: 10px;
        text-align: center;
        line-height: 30px;
    }

    #yw4-1 {
        width: 30px;
        height: 30px;
        position: absolute;
        margin-left: 218px;
        margin-top: 463px;
        border-radius: 10px;
        text-align: center;
        line-height: 30px;
    }

    

    #ry1-1 {
        width: 30px;
        height: 30px;
        position: absolute;
        margin-left: 218px;
        margin-top: 124px;
        border-radius: 10px;
        text-align: center;
        line-height: 30px;
    }
    #ry2-1 {
        width: 30px;
        height: 30px;
        position: absolute;
        margin-left: 250px;
        margin-top: 124px;
        border-radius: 10px;
        text-align: center;
        line-height: 30px;
        
    }
    #ry3-1 {
        width: 30px;
        height: 30px;
        position: absolute;
        margin-left: 250px;
        margin-top: 315px;
        border-radius: 10px;
        text-align: center;
        line-height: 30px;
        
    }
    #ry4-1 {
        width: 30px;
        height: 30px;
        position: absolute;
        margin-left: 218px;
        margin-top: 315px;
        border-radius: 10px;
        text-align: center;
        line-height: 30px;
        
    }
    #ry1-2 {
        width: 28px;
        height: 28px;
        position: absolute;
        margin-left: 193px;
        margin-top: 136px;
        border-radius: 10px;
        text-align: center;
        line-height: 30px;
        
    }

    #ry2-2 {
        width: 28px;
        height: 28px;
        position: absolute;
        margin-left: 280px;
        margin-top: 136px;
        border-radius: 10px;
        text-align: center;
        line-height: 30px;
        
    }

    #ry3-2 {
        width: 28px;
        height: 28px;
        position: absolute;
        margin-left: 280px;
        margin-top: 306px;
        border-radius: 10px;
        text-align: center;
        line-height: 30px;
        
    }

    #ry4-2 {
        width: 28px;
        height: 28px;
        position: absolute;
        margin-left: 193px;
        margin-top: 306px;
        border-radius: 10px;
        text-align: center;
        line-height: 30px;
        
    }
    #ry1-3 {
        width: 32px;
        height: 30px;
        position: absolute;
        margin-left: 169px;
        margin-top: 155px;
        border-radius: 10px;
        text-align: center;
        line-height: 30px;
        
    }

    #ry2-3 {
        width: 32px;
        height: 30px;
        position: absolute;
        margin-left: 299px;
        margin-top: 155px;
        border-radius: 10px;
        text-align: center;
        line-height: 30px;
        
    }

    #ry3-3 {
        width: 32px;
        height: 30px;
        position: absolute;
        margin-left: 299px;
        margin-top: 285px;
        border-radius: 10px;
        text-align: center;
        line-height: 30px;
        
    }

    #ry4-3 {
        width: 32px;
        height: 30px;
        position: absolute;
        margin-left: 169px;
        margin-top: 285px;
        border-radius: 10px;
        text-align: center;
        line-height: 30px;
        
    }
    #ry1-4 {
        width: 32px;
        height: 30px;
        position: absolute;
        margin-left: 157px;
        margin-top: 183px;
        border-radius: 10px;
        text-align: center;
        line-height: 30px;
        
    }

    #ry2-4 {
        width: 32px;
        height: 30px;
        position: absolute;
        margin-left: 312px;
        margin-top: 183px;
        border-radius: 10px;
        text-align: center;
        line-height: 30px;
        
    }

    #ry3-4 {
        width: 32px;
        height: 30px;
        position: absolute;
        margin-left: 312px;
        margin-top: 257px;
        border-radius: 10px;
        text-align: center;
        line-height: 30px;
        
    }

    #ry4-4 {
        width: 32px;
        height: 30px;
        position: absolute;
        margin-left: 157px;
        margin-top: 257px;
        border-radius: 10px;
        text-align: center;
        line-height: 30px;
        
    }
    #ry1-5 {
        width: 32px;
        height: 30px;
        position: absolute;
        margin-left: 143px;
        margin-top: 208px;
        border-radius: 10px;
        text-align: center;
        line-height: 30px;
        
    }

    #ry2-5 {
        width: 32px;
        height: 30px;
        position: absolute;
        margin-left: 322px;
        margin-top: 208px;
        border-radius: 10px;
        text-align: center;
        line-height: 30px;
        
    }

    #ry3-5 {
        width: 32px;
        height: 30px;
        position: absolute;
        margin-left: 322px;
        margin-top: 232px;
        border-radius: 10px;
        text-align: center;
        line-height: 30px;
        
    }

    #ry4-5 {
        width: 32px;
        height: 30px;
        position: absolute;
        margin-left: 143px;
        margin-top: 232px;
        border-radius: 10px;
        text-align: center;
        line-height: 30px;
        
    }
    .divclick:hover {
        background-color: aqua;
        opacity: 0.4;
    }
    .rydivclick:hover {
        background-color: aqua;
        opacity: 0.4;
    }
    #ds1-0 {
        width: 30px;
        height: 30px;
        position: absolute;
        margin-left: 235px;
        margin-top: 55px;
        border-radius: 10px;
        text-align: center;
        line-height: 30px;
    }
    #ds2-0 {
        width: 30px;
        height: 30px;
        position: absolute;
        margin-left: 235px;
        margin-top: 410px;
        border-radius: 10px;
        text-align: center;
        line-height: 30px;
    }
    .dsdivclick:hover {
        background-color: aqua;
        opacity: 0;
    }
</style>

<body>
    <div class="teeth-container">
        <div id="yw1-8" class="divclick"></div>
        <div id="yw2-8" class="divclick"></div>
        <div id="yw3-8" class="divclick"></div>
        <div id="yw4-8" class="divclick"></div>
        <div id="yw1-7" class="divclick"></div>
        <div id="yw2-7" class="divclick"></div>
        <div id="yw3-7" class="divclick"></div>
        <div id="yw4-7" class="divclick"></div>
        <div id="yw1-6" class="divclick"></div>
        <div id="yw2-6" class="divclick"></div>
        <div id="yw3-6" class="divclick"></div>
        <div id="yw4-6" class="divclick"></div>
        <div id="yw1-5" class="divclick"></div>
        <div id="yw2-5" class="divclick"></div>
        <div id="yw3-5" class="divclick"></div>
        <div id="yw4-5" class="divclick"></div>
        <div id="yw1-4" class="divclick"></div>
        <div id="yw2-4" class="divclick"></div>
        <div id="yw3-4" class="divclick"></div>
        <div id="yw4-4" class="divclick"></div>
        <div id="yw1-3" class="divclick"></div>
        <div id="yw2-3" class="divclick"></div>
        <div id="yw3-3" class="divclick"></div>
        <div id="yw4-3" class="divclick"></div>
        <div id="yw1-2" class="divclick"></div>
        <div id="yw2-2" class="divclick"></div>
        <div id="yw3-2" class="divclick"></div>
        <div id="yw4-2" class="divclick"></div>
        <div id="yw1-1" class="divclick"></div>
        <div id="yw2-1" class="divclick"></div>
        <div id="yw3-1" class="divclick"></div>
        <div id="yw4-1" class="divclick"></div>

        <div id="ds1-0" class="dsdivclick"></div>
        <div id="ds2-0" class="dsdivclick"></div>
    </div>
    <div class="bg-ryt">
        <div id="ry1-1" class="rydivclick"></div>
        <div id="ry2-1" class="rydivclick"></div>
        <div id="ry3-1" class="rydivclick"></div>
        <div id="ry4-1" class="rydivclick"></div>
        <div id="ry1-2" class="rydivclick"></div>
        <div id="ry2-2" class="rydivclick"></div>
        <div id="ry3-2" class="rydivclick"></div>
        <div id="ry4-2" class="rydivclick"></div>
        <div id="ry1-3" class="rydivclick"></div>
        <div id="ry2-3" class="rydivclick"></div>
        <div id="ry3-3" class="rydivclick"></div>
        <div id="ry4-3" class="rydivclick"></div>
        <div id="ry1-4" class="rydivclick"></div>
        <div id="ry2-4" class="rydivclick"></div>
        <div id="ry3-4" class="rydivclick"></div>
        <div id="ry4-4" class="rydivclick"></div>
        <div id="ry1-5" class="rydivclick"></div>
        <div id="ry2-5" class="rydivclick"></div>
        <div id="ry3-5" class="rydivclick"></div>
        <div id="ry4-5" class="rydivclick"></div>

    </div>
    <div class="nr-xzyw">
        <div style="width:100px;height:100px;float:left;">
            <table class="form">
                <tr>
                    <td class="formValue">
                        <input id="rpt_ywtqx" type="button" class="btn btn-primary" value="全选" onclick="ywtqx()">
                        @*<input id="ywtqx_qx" type="button" style="width:50px" class="btn btn-primary" value="全选" onclick="ywtqx()">*@
                    </td>
                </tr>
                <tr>
                    <td class="formValue">
                        <input id="rpt_ywtqc" type="button" class="btn btn-primary" value="清除" onclick="ywtqc()">
                        @*<input id="ywtqc_qc" type="button" style="width:50px" class="btn btn-primary" value="清除" onclick="ywtqc()">*@
                    </td>
                </tr>
            </table>
        </div>
        <div style="width:100px;height:100px;float:left;">
            <table class="form">
                <tr>
                    <td class="formValue">
                        <input id="rpt_hy" name="ywlx" onclick="ywlxxz('hy')" checked="checked" value="yw" type="radio"> 恒牙
                        @*<input id="ywtqx_qx" type="button" style="width:50px" class="btn btn-primary" value="全选" onclick="ywtqx()">*@
                    </td>
                </tr>
                <tr>
                    <td class="formValue">
                        <input id="rpt_ry" name="ywlx" onclick="ywlxxz('ry')"  value="ry" type="radio"> 乳牙
                        @*<input id="ywtqc_qc" type="button" style="width:50px" class="btn btn-primary" value="清除" onclick="ywtqc()">*@
                    </td>
                </tr>
                <tr>
                    <td class="formValue">
                        <input id="rpt_hhy" name="ywlx" onclick="ywlxxz('hhy')"  value="hhy" type="radio"> 混合牙
                        @*<input id="ywtqc_qc" type="button" style="width:50px" class="btn btn-primary" value="清除" onclick="ywtqc()">*@
                    </td>
                </tr>
                <tr>
                    <td class="formValue">
                        <input id="rpt_dsy" name="ywlx" onclick="ywlxxz('dsy')"  value="dsy" type="radio"> 多生牙
                        @*<input id="ywtqc_qc" type="button" style="width:50px" class="btn btn-primary" value="清除" onclick="ywtqc()">*@
                    </td>
                </tr>
            </table>
        </div>
    </div>
</body>
<script>

    $(function () {
        var ywstr = $.request("ywstr");
        var ywlx = $.request("ywlx");
        if (ywlx == "yw") {
            $("#rpt_hy").attr("checked",true);
            $(".teeth-container").css("background-image", "url('../../Content/img/牙位图.png')");
            $(".rydivclick").css("opacity", "0");
            if (ywstr != "") {
                for (var i = 0; i < ywstr.split(',').length; i++) {
                    if (ywstr.split(',')[i] != "") {
                        var id = ywstr.split(',')[i];
                        $("#" + id).val(id);
                        $("#" + id).css("background-color", "red");
                        $("#" + id).css("opacity", "0.6");
                    }
                }
            }
        }
        else if (ywlx == "ry") {
            $("#rpt_ry").attr("checked", true);
            ywlxxz(ywlx);
            for (var i = 0; i < ywstr.split(',').length; i++) {
                if (ywstr.split(',')[i] != "") {
                    var id = ywstr.split(',')[i];
                    $("#" + id).val(id);
                    $("#" + id).css("background-color", "red");
                    $("#" + id).css("opacity", "0.6");
                }
            }
        }
        else if (ywlx == "hhy") {
            $("#rpt_hhy").attr("checked", true);
            ywlxxz(ywlx);
            for (var i = 0; i < ywstr.split(',').length; i++) {
                if (ywstr.split(',')[i] != "") {
                    var id = ywstr.split(',')[i];
                    $("#" + id).val(id);
                    $("#" + id).css("background-color", "red");
                    $("#" + id).css("opacity", "0.6");
                }
            }
        }
        else if (ywlx == "dsy") {
            $("#rpt_dsy").attr("checked", true);
            ywlxxz(ywlx);
            for (var i = 0; i < ywstr.split(',').length; i++) {
                if (ywstr.split(',')[i] != "") {
                    var id = ywstr.split(',')[i];
                    $("#" + id).val(id);
                    $("#" + id).css("background-color", "red");
                    $("#" + id).css("opacity", "0.6");
                }
            }
        }
        else {
            $(".teeth-container").css("background-image", "url('../../Content/img/牙位图.png')");
            $(".rydivclick").css("opacity", "0");
        }
        //$(".bg-ryt").css("background-image", "url('../../Content/img/乳牙图.png')");
        $('.divclick').click(function (e) {
            var val = $('input:radio[name="ywlx"]:checked').val();
            if (val == "yw" || val == "hhy" || val == "dsy") {
                var id = $(e.target).attr("id");
                if ($("#" + id).val() == "") {
                    $("#" + id).val(id);
                    $("#" + id).css("background-color", "red");
                    $("#" + id).css("opacity", "0.6");
                }
                else {
                    $("#" + id).val("");
                    $("#" + id).css("background-color", "");
                }
            }
        });
        $('.rydivclick').click(function (e) {
            var val = $('input:radio[name="ywlx"]:checked').val();
            if (val == "ry" || val == "hhy") {
                var id = $(e.target).attr("id");
                if ($("#" + id).val() == "") {
                    $("#" + id).val(id);
                    $("#" + id).css("background-color", "red");
                    $("#" + id).css("opacity", "0.6");
                }
                else {
                    $("#" + id).val("");
                    $("#" + id).css("background-color", "");
                }
            }

        });
        $('.dsdivclick').click(function (e) {
            var val = $('input:radio[name="ywlx"]:checked').val();
            if (val == "dsy") {
                var id = $(e.target).attr("id");
                if ($("#" + id).val() == "") {
                    $("#" + id).val(id);
                    $("#" + id).css("background-color", "red");
                    $("#" + id).css("opacity", "0.6");
                }
                else {
                    $("#" + id).val("");
                    $("#" + id).css("background-color", "");
                }
            }
        });
        $('#rpt_ywtqx').click(function (e) {
            var val = $('input:radio[name="ywlx"]:checked').val();
            if (val == "hhy") {
                nrqx("yw");
                nrqx("ry");
            }
            else if (val == "dsy") {
                nrqx("yw");
                dsyqx();
            }else{
                nrqx(val);
            }
        });
        $('#rpt_ywtqc').click(function (e) {
            qcsy("yw");
            qcsy("ry");
            qcdsy();
        });
    });
    function dsyqx() {
        $("#ds1-0").val("ds1-0");
        $("#ds1-0").css("background-color", "red");
        $("#ds1-0").css("opacity", "0.6");
        $("#ds2-0").val("ds2-0");
        $("#ds2-0").css("background-color", "red");
        $("#ds2-0").css("opacity", "0.6");
    }
    function qcdsy() {
        $("#ds1-0").val("");
        $("#ds1-0").css("background-color", "");
        $("#ds2-0").val("");
        $("#ds2-0").css("background-color", "");
    }
    function nrqx(ywlx) {
        for (var i = 1; i < 9; i++) {
            $("#" + ywlx + "1-" + i).val(ywlx+"1-" + i);
            $("#" +  ywlx+"1-" + i).css("background-color", "red");
            $("#" +  ywlx+"1-" + i).css("opacity", "0.6");
            $("#" + ywlx + "2-" + i).val(ywlx +"2-" + i);
            $("#" +  ywlx+"2-" + i).css("background-color", "red");
            $("#" +  ywlx+"2-" + i).css("opacity", "0.6");
            $("#" + ywlx + "3-" + i).val(ywlx +"3-" + i);
            $("#" +  ywlx+"3-" + i).css("background-color", "red");
            $("#" +  ywlx+"3-" + i).css("opacity", "0.6");
            $("#" + ywlx + "4-" + i).val(ywlx +"4-" + i);
            $("#" +  ywlx+"4-" + i).css("background-color", "red");
            $("#" +  ywlx+"4-" + i).css("opacity", "0.6");
        }
    }
    function AcceptClick(callBack) {
        var ywtstr = "";
        var val = $('input:radio[name="ywlx"]:checked').val();
        if (val == "yw") {
            for (var i = 1; i < 9; i++) {
                if ($("#" + "yw1-" + i).val() != "") {
                    ywtstr += $("#" + "yw1-" + i).val() + ",";
                }
                if ($("#" + "yw2-" + i).val() != "") {
                    ywtstr += $("#" + "yw2-" + i).val() + ",";
                }
                if ($("#" + "yw3-" + i).val() != "") {
                    ywtstr += $("#" + "yw3-" + i).val() + ",";
                }
                if ($("#" + "yw4-" + i).val() != "") {
                    ywtstr += $("#" + "yw4-" + i).val() + ",";
                }
            }
        }
        else if (val == "ry") {
            for (var i = 1; i < 6; i++) {
                if ($("#" + "ry1-" + i).val() != "") {
                    ywtstr += $("#" + "ry1-" + i).val() + ",";
                }
                if ($("#" + "ry2-" + i).val() != "") {
                    ywtstr += $("#" + "ry2-" + i).val() + ",";
                }
                if ($("#" + "ry3-" + i).val() != "") {
                    ywtstr += $("#" + "ry3-" + i).val() + ",";
                }
                if ($("#" + "ry4-" + i).val() != "") {
                    ywtstr += $("#" + "ry4-" + i).val() + ",";
                }
            }
        }
        else if (val == "hhy") {
            for (var i = 1; i < 6; i++) {
                if ($("#" + "ry1-" + i).val() != "") {
                    ywtstr += $("#" + "ry1-" + i).val() + ",";
                }
                if ($("#" + "ry2-" + i).val() != "") {
                    ywtstr += $("#" + "ry2-" + i).val() + ",";
                }
                if ($("#" + "ry3-" + i).val() != "") {
                    ywtstr += $("#" + "ry3-" + i).val() + ",";
                }
                if ($("#" + "ry4-" + i).val() != "") {
                    ywtstr += $("#" + "ry4-" + i).val() + ",";
                }
            }
            for (var j = 1; j < 9; j++) {
                if ($("#" + "yw1-" + j).val() != "") {
                    ywtstr += $("#" + "yw1-" + j).val() + ",";
                }
                if ($("#" + "yw2-" + j).val() != "") {
                    ywtstr += $("#" + "yw2-" + j).val() + ",";
                }
                if ($("#" + "yw3-" + j).val() != "") {
                    ywtstr += $("#" + "yw3-" + j).val() + ",";
                }
                if ($("#" + "yw4-" + j).val() != "") {
                    ywtstr += $("#" + "yw4-" + j).val() + ",";
                }
            }

        }
        else if (val == "dsy") {
            for (var j = 1; j < 9; j++) {
                if ($("#" + "yw1-" + j).val() != "") {
                    ywtstr += $("#" + "yw1-" + j).val() + ",";
                }
                if ($("#" + "yw2-" + j).val() != "") {
                    ywtstr += $("#" + "yw2-" + j).val() + ",";
                }
                if ($("#" + "yw3-" + j).val() != "") {
                    ywtstr += $("#" + "yw3-" + j).val() + ",";
                }
                if ($("#" + "yw4-" + j).val() != "") {
                    ywtstr += $("#" + "yw4-" + j).val() + ",";
                }
            }
            if ($("#ds1-0").val() != "") {
                ywtstr += $("#ds1-0").val() + ",";
            }
            if ($("#ds2-0").val() != "") {
                ywtstr += $("#ds2-0").val()+ ",";
            }
        }
        var ywdata = {
            ywtstr: ywtstr,
            ywlx: $('input:radio[name="ywlx"]:checked').val()
        }
        callBack(ywdata);
        $.modalClose();
    }
    function qcsy(ywlx) {
        for (var i = 1; i < 9; i++) {
            $("#" + ywlx+"1-" + i).val("");
            $("#" + ywlx+"1-" + i).css("background-color", "");

            $("#" + ywlx +"2-" + i).val("");
            $("#" + ywlx+"2-" + i).css("background-color", "");

            $("#" + ywlx +"3-" + i).val("");
            $("#" + ywlx +"3-" + i).css("background-color", "");

            $("#" + ywlx +"4-" + i).val("");
            $("#" + ywlx+"4-" + i).css("background-color", "");
        }
    }
    function ywlxxz(ywlx) {
        if (ywlx == "ry") {
            $(".bg-ryt").css("background-image", "url('../../Content/img/乳牙图.png')");
            $(".teeth-container").css("background-image", "");
            qcsy("yw");
            qcsy("ry");
            qcdsy();
            $(".divclick").css("opacity", "0");
            $(".rydivclick").css("opacity", "0.4");
            $(".dsdivclick").css("opacity", "0");
        }
        else if (ywlx == "hy") {
            qcsy("ry");
            qcsy("yw");
            qcdsy();
            $(".rydivclick").css("opacity", "0");
            $(".divclick").css("opacity", "0.6");
            $(".dsdivclick").css("opacity", "0");
            $(".teeth-container").css("background-image", "url('../../Content/img/牙位图.png')");
            $(".bg-ryt").css("background-image", "");

        }
        else if (ywlx == "hhy") {
            qcsy("yw");
            qcsy("ry");
            qcdsy();
            $(".rydivclick").css("opacity", "0.6");
            $(".divclick").css("opacity", "0.6");
            $(".dsdivclick").css("opacity", "0");
            $(".bg-ryt").css("background-image", "url('../../Content/img/乳牙图.png')");
            $(".teeth-container").css("background-image", "url('../../Content/img/牙位图.png')");
        }
        else if (ywlx == "dsy") {
            qcsy("yw");
            qcsy("ry");
            qcdsy();
            $(".rydivclick").css("opacity", "0");
            $(".divclick").css("opacity", "0.6");
            $(".dsdivclick").css("opacity", "0.6");
            $(".teeth-container").css("background-image", "url('../../Content/img/多生牙.png')");
            $(".bg-ryt").css("background-image", "");
        }
    }
</script>